#!/bin/bash
echo "clean db!!"
rm -rf ./resultdb
echo "start backup 27018 spider resultdb !!"
mongodump -h 127.0.0.1  --port 27018 -u wanglei -p 0-=p[]P{} --authenticationDatabase resultdb -d resultdb -c bilibili_lo -o .
# echo "backup  finished !!"
# echo "=================="
# echo "restore  27017  starting  !!"
# mongorestore -h 127.0.0.1 --port 27017 -u xmtj -p 0-=p[]P{} --authenticationDatabase admin  -d resultdb  --drop ./resultdb/resultdb
# echo "restore  mongo finished  !!"